FROM centos:7.6.1810


COPY openGauss-3.1.0-CentOS-64bit-all.tar.gz .
COPY gs_createtrust.py .

ENV LANG en_US.utf8

RUN set -eux; \
    yum install -y bzip2 bzip2-devel curl libaio libaio-devel readline-devel expect \
    which git python3 python3-devel openssl-devel net-tools openssh-server vim cronie initscripts && \
    mkdir -p /opengauss && \
    chmod 755 /opengauss && \
    mv openGauss-3.1.0-CentOS-64bit-all.tar.gz /opengauss && \
    mv gs_createtrust.py /opengauss && \
    mkdir -p /volume && \
    chmod -R 755 /volume
    

COPY entrypoint.sh /usr/local/bin/
COPY install.sh /usr/local/bin/
COPY util.sh /usr/local/bin/
COPY generatexml.py /usr/local/bin/
RUN chmod 755 /usr/local/bin/entrypoint.sh;ln -s /usr/local/bin/entrypoint.sh /
RUN chmod 755 /usr/local/bin/install.sh;ln -s /usr/local/bin/install.sh /
RUN chmod 755 /usr/local/bin/util.sh;ln -s /usr/local/bin/util.sh /


ENTRYPOINT ["entrypoint.sh"]

#CMD ["tail -f /usr1/build/workspace/build.log"]